<!DOCTYPE html>
<html>
<head>
    <title>校区管理</title>
    <#include "/header.html">
        </head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.schoolName" @keyup.enter="query" placeholder="校区名称">
            </div>
            <a class="btn btn-default" @click="query">查询</a>

            <#if shiro.hasPermission("sys:tblschool:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
            <#if shiro.hasPermission("sys:tblschool:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <#if shiro.hasPermission("sys:tblschool:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
        </div>

        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">校区名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.schoolName" placeholder="校区名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">校区代码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.schoolCode" placeholder="校区代码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">所属部门</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" style="cursor:pointer;" v-model="tblSchool.deptName"
                           @click="deptTree" readonly="readonly" placeholder="所属部门"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">主体</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.organization" placeholder="主体"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">教师长</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.trsId" placeholder="教师长"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">校长</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.principalId" placeholder="校长"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">公司ID</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.companyId" placeholder="公司ID"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">地址</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.address" placeholder="地址"/>
                </div>
            </div>
<!--            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">区域id sys_dept id 类型为区域</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.areaId"
                           placeholder="区域id sys_dept id 类型为区域"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">大区id sys_dept id 类型为大区</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.bigAreaId"
                           placeholder="大区id sys_dept id 类型为大区"/>
                </div>
            </div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">联系电话</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.concatorPhone" placeholder="联系电话"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.attribute1" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.attribute2" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.attribute3" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.attribute4" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <div class="col-sm-2 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="tblSchool.attribute5" placeholder="备注"/>
                </div>

            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<!-- 选择部门 -->
<div id="schoolLayer" style="display: none;padding:10px;">
    <ul id="deptTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/sys/tblschool.js?_${.now?long}"></script>
</body>
</html>